import React from 'react';
import ReactDOM from 'react-dom';
import './index.css';
import App from './App';
import reportWebVitals from './reportWebVitals';
import { BrowserRouter as Router } from "react-router-dom";
// 引入antd组件样式
import 'antd/dist/antd.css'; // or 'antd/dist/antd.less'
import "./mock/index.js" // 引入mock
// 导入store
import store from './redux/store';
// 导入Provider 组件，利用这个组件包裹我们的结构，从而达到统一维护store的效果
import { Provider } from 'react-redux'

ReactDOM.render(
  <Provider store={store}>
    <Router>
      <App />
    </Router>
  </Provider>,
  document.getElementById('root')
);

// If you want to start measuring performance in your app, pass a function
// to log results (for example: reportWebVitals(console.log))
// or send to an analytics endpoint. Learn more: https://bit.ly/CRA-vitals
reportWebVitals();
